import myAxios from '@/utils/request'

// 获取图形验证码请求
export const getImgAsync = () => myAxios.get('/captcha/image')

// 获取短信验证码请求
export const getMesAsync = (form) => {
  return myAxios({
    url: '/captcha/sendSmsCaptcha',
    method: 'POST',
    data: {
      form
    }
  })
}

// 登录请求
export const postLoginAsync = (mobile, smsCode) => {
  return myAxios({
    url: '/passport/login',
    method: 'POST',
    data: {
      form: {
        isParty: false,
        partyData: {},
        mobile,
        smsCode
      }
    }
  })
}
